package com.hst.capacity.facade.rest;

import com.hst.capacity.application.biz.InvoiceBiz;
import com.hst.capacity.domain.model.request.invoice.InvoiceLstParam;
import com.hst.capacity.domain.model.response.DefaultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

import static com.hst.capacity.domain.model.response.DefaultVO.success;

@RequestMapping("/finance")
@RestController
public class FinanceController {

    @Autowired
    InvoiceBiz invoiceBiz;

    /**
     * 发票数据取得
     * @param
     * @return
     */
    @PostMapping("/invoice/list")
    private DefaultVO findInvoiceLst(@RequestBody @Valid InvoiceLstParam param) {
        return success(invoiceBiz.findInvoiceLst(param));
    }

}
